package com.example.demo.manual.service.impl;

import com.beiding.businessplatform.request.Requester;
import com.example.demo.auto.model.A;
import com.example.demo.auto.service.impl.AVmServiceAutoImpl;
import org.springframework.stereotype.Service;

@Service
public class AServiceImpl extends AVmServiceAutoImpl {


    @Override
    public void changeName(String id, String name) {
        A a = retrieve(id);
        if (a != null) {
            a.setName(name);
            save(a);
        }
    }

    public void changeName(Requester<A> requester) {
        changeName(requester.requireString("id"), requester.requireString("name"));
    }

}
